﻿@import '/admin/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';
:root {
 --sitenav-with: 18rem;
}

body {
    height: 100%;
    overflow: hidden;
}

.siteheader {
    border-bottom: calc(var(--stroke-width) * 2px) solid var(--accent-fill-rest);
    margin-bottom: 0 !important;
}

    .siteheader .logo {
        width: 108px;
        height: 23px;
        grid-column: 1;
    }

    .siteheader .search {
        display: flex;
        align-items: center;
        padding-right: 20px;
    }

    .siteheader .links {
        padding-right: 10px;
        display: flex;
        align-items: center;
    }

    .siteheader .notifications {
        display: flex;
        align-items: center;
    }

    .siteheader .settings {
        padding-right: 6px;
        display: flex;
        align-items: center;
        margin-left: 0;
        margin-right: 10px;
    }

[dir="rtl"] .siteheader .settings {
    padding: 0 0 0 6px;
    margin-left: 10px;
    margin-right: 0;
}

[dir="rtl"] .siteheader .search {
    padding-left: 20px;
    padding-right: 0;
}

[dir="rtl"] .siteheader .links {
    padding-left: 10px;
}

.search-result-icon {
    vertical-align: middle;
}

.body-stack {
    flex-direction: row;
}

.footer {
    display: flex !important;
    flex-direction: row !important;
    background: var(--neutral-layer-4);
    color: var(--neutral-foreground-rest) !important;
    padding: 10px 10px;
    margin-top: 0px !important;
}

    .footer .version a {
        color: var(--neutral-foreground-rest);
        text-decoration: none;
    }

        .footer .version a:focus {
            outline: 1px dashed;
            outline-offset: 3px;
        }

        .footer .version a:hover {
            text-decoration: underline;
        }


nav.sitenav {
    background-color: var(--neutral-layer-1);
    padding: 1.5rem 1rem;
    height: calc(100dvh - 90px);
    width: var(--sitenav-with); /*18rem;*/
    overflow-y: auto;
}

nav h2 {
    font-size: var(--type-ramp-plus-1-font-size);
    line-height: var(--type-ramp-plus-1-line-height);
    padding: 15px 0;
    margin: 0;
    pointer-events: none;
}

nav h3 {
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-minus-1-line-height);
    padding: 10px 0;
    margin: 0;
    pointer-events: none;
}


nav fluent-anchor {
    width: 100%;
    color: var(--fill-color);
}

    nav fluent-anchor::part(control) {
        justify-content: start;
        background: var(--accent-fill-rest);
    }


.fluent-nav-link.notactive .fluent-nav-text {
    font-weight: 600 !important;
}

.content {
    display: flex;
    background-color: var(--neutral-layer-1);
}

article {
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--neutral-stroke-divider-rest);
    margin: 0 0;
    overflow-x: hidden;
    transition: all 300ms ease-in-out;
    width: calc(100% - 18rem);
}

aside {
    padding: 1.5rem 1rem;
    top: 0px;
    height: 100vh;
    position: sticky;
    width: 18rem;
}

#navmenu-toggle {
    display: none;
}

.navmenu-icon {
    display: none;
}

#navmenu-toggle:checked > nav {
    width: 0px;
}

[dir="rtl"] #navmenu-toggle:checked ~ nav {
    right: 0px;
}

#color {
    margin-right: 10px;
    margin-left: 0;
}

[dir="rtl"] #color {
    margin-left: 10px;
    margin-right: 0;
}


label {
    color: var(--neutral-foreground-rest);
    cursor: pointer;
}

.shell, .sourceCode {
    background: var(--neutral-stroke-layer-rest);
    padding: 7px;
}

code {
    background: var(--neutral-stroke-layer-rest);
}

.demopanel {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
}

.highlighted-row {
    background-color: var(--neutral-fill-secondary-hover);
}

kbd {
    padding: 0.10rem 0.25rem;
    font-size: 0.875em;
    color: var(--neutral-foreground-rest);
    background-color: var(--neutral-fill-secondary-rest);
    border-radius: 0.25rem;
    border: 1px solid var(--accent-fill-rest);
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 20px 0;
    color: var(--neutral-foreground-rest);
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    border: 1px dashed var(--error);
    background: url("") no-repeat 1rem/1.8rem;
    padding: 1rem 1rem 1rem 3.7rem;
}

    .blazor-error-boundary::before {
        content: "An error has occurred: "
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var( --neutral-fill-layer-rest);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

@media (max-width: 767px) {

    .siteheader {
        grid-area: header;
        grid-template-columns: 150px 1fr;
        align-items: center;
        justify-content: flex-start;
    }

        .siteheader .search {
            display: none;
        }

        .siteheader .logo {
            width: 160px;
            height: 23px;
            /*padding: 0 25px;*/
        }


    .body-stack {
        flex-direction: column !important;
    }

    nav.sitenav {
        width: 100%;
        height: calc(100dvh - 50px);
    }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset
    }

    #navmenu-toggle ~ nav {
        display: none;
    }

    #navmenu-toggle:checked ~ nav {
        display: block;
    }

    #navmenu-toggle ~ article {
        display: block;
    }

    #navmenu-toggle:checked ~ article {
        display: none;
    }

    .content {
        flex-direction: column;
    }

    article {
        padding-top: 0px;
        width: 100%;
    }

    aside {
        padding: 1em 0.75em;
        width: 100%;
    }

    .footer {
        display: grid;
        grid-template-columns: 10px auto 10px;
    }

        .footer .version {
            grid-column: 2;
            justify-self: start;
        }

        .footer .copy {
            grid-column: 2;
            grid-row: 2;
            justify-self: end;
        }


    @media screen and (max-width: 767px) and (orientation: landscape) {

        nav {
            padding: 25px 40px;
        }

            nav ul {
                margin: 0 0;
            }
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    fluent-select::part(control) {
        width: 150px;
    }

    aside {
        padding: 1.5em 0.75em 1em 0.75em;
        width: 12rem;
    }

    article {
        padding-top: 0px;
        width: 100%;
    }
}


/* Surface Duo specific styling */
@media (horizontal-viewport-segments: 2) {

    .siteheader {
        grid-area: header;
        display: grid;
        grid-template-columns: 150px calc(env(viewport-segment-width 0 0) - 160px) 1fr;
        grid-template-rows: 1fr;
        align-items: center;
        justify-content: flex-start;
        padding: 12px 0;
        background-color: var(--neutral-layer-4);
    }

        .siteheader a {
            padding: 0px 15px;
            color: var(--neutral-foreground-rest);
        }

        .siteheader .logo {
            grid-column: 1;
            width: 108px;
            height: 23px;
            /*padding: 0 30px;*/
        }

    main {
        display: grid;
        grid-template-columns: env(viewport-segment-width 0 0) 1fr;
        grid-template-rows: repeat(0, 1fr);
    }

    nav {
        grid-column: 1;
        width: env(viewport-segment-width 0 0) !important;
    }

    .content {
        display: grid;
        grid-template-columns: auto;
    }

    aside {
        grid-area: 2 / 2 / 3 / 3;
        padding: 1.5em 0.75em 1em 0.75em;
        margin-inline-start: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); /* hinge width */
        margin-inline-end: calc(100% - env(viewport-segment-left 1 0));
        width: auto;
    }

    article {
        grid-area: 1 / 2 / 2 / 3;
        padding-top: 0px;
        margin-inline-start: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); /* hinge width */
        margin-inline-end: calc(100% - env(viewport-segment-left 1 0));
        width: auto;
    }
}



@media (min-width: 800px) {
    .fluent-dialog-main {
        --dialog-width: 340px;
    }
}


@media (max-width: 480px) {
    .fluent-dialog-main {
        --dialog-width: 100vw;
    }
}
